home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 April / EnigmA AMIGA RUN 17 (1997)(G.R. Edizioni)(IT)[!][issue 1997-04][EAR-CD].iso / EARCD / biz / demo / FamCon35a_demo.lha / FamCon / paginate_summary.rexx < prev    next >
OS/2 REXX Batch file  |  1994-04-23  |  818b  |  42 lines

  1. /* Program to take Genie summary output and add date and page numbers    */
  2. /* E.M.Greene     4/23/94                        */
  3.  
  4. parse arg file_name family_name .
  5.  
  6. page_header = d2c(12) || family_name || " family summary        "
  7. page_header = page_header || date() || "            Page"
  8. page_num = 1
  9.  
  10. if open(f, "paginate_summary.txt","R") then do
  11.   do forever
  12.     line = readln(f)
  13.     if eof(f) then
  14.       leave
  15.     say line
  16.   end
  17.   x = close(f)
  18. end
  19.  
  20. if open(f, file_name, "r") then do
  21.   say page_header page_num
  22.   say
  23.   page_num = page_num + 1
  24.   do forever
  25.     line = readln(f)
  26.     if eof(f) then
  27.       leave
  28.     if left(line,1) = d2c(12) then do
  29.       say page_header page_num
  30.       say
  31.       page_num = page_num + 1
  32.       say substr(line,2)
  33.     end
  34.     else
  35.       say line
  36.   end
  37.   x = close(f)
  38. end
  39. else
  40.   say "Couldn't open '" || file_name || "'"
  41. exit
  42.